<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!DOCTYPE html>
    <html lang="zh-CN">

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>

    <body>
        <button id="btn">获取歌手信息</button>
        <div id="app">
            <ul id="list">

            </ul>
        </div>
        <script>

            let btn = document.getElementById('btn')//获取按钮
            btn.addEventListener('click', () => {//click表示鼠标按下的点击事件
                //获取歌手信息
                fetch('https://mock.mengxuegu.com/mock/66585c4db462b81cb3916d3e/songer/songer', {
                    method: 'GET'//请求类型
                }).then((response) => {
                    return response.json() //解析数据
                }).then((data) => {
                    console.log(data);
                })
            })

        </script>
    </body>

    </html>
</body>

</html>